#pragma once

#include "stdafx.h"

#include <memory>


namespace qwtapi
{

class QWTAPI_EXPORT CallInfo
{
    friend class Call;

public:
    LONG refresh();
    bool isValid() const;

    DWORD getAddressId() const;
    QString getCallerIdNumber() const;
    QString getCallerIdName() const;
    QString getConnectedIdNumber() const;
    QString getConnectedIdName() const;
    QString getCalledIdNumber() const;
    QString getCalledIdName() const;
    QString getRedirectingIdNumber() const;
    QString getRedirectingIdName() const;
    QString getRedirectionIdNumber() const;
    QString getRedirectionIdName() const;

private:
    CallInfo(HCALL hCall);
    ~CallInfo();
    CallInfo(const CallInfo&) { Q_ASSERT(false); }
    CallInfo& operator=(const CallInfo&) { Q_ASSERT(false); return *this; }

    HCALL m_hCall;
    LPLINECALLINFO m_pCallInfo;
};

}